package com.sailfish.springbootdemo.service.db1;

import com.sailfish.springbootdemo.dao.db1.LineBaseBigTypeDao;
import com.sailfish.springbootdemo.dao.db1.LineBaseParamDao;
import com.sailfish.springbootdemo.dao.db1.LineBaseSmallTypeDao;
import com.sailfish.springbootdemo.pojo.db1.LineBaseBigType;
import com.sailfish.springbootdemo.pojo.db1.LineBaseParam;
import com.sailfish.springbootdemo.pojo.db1.LineBaseSmallType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LineBaseParamServiceImpl implements LineBaseParamService {

    @Autowired
    private LineBaseSmallTypeDao lineBaseSmallTypeDao;

    @Autowired
    private LineBaseBigTypeDao lineBaseBigTypeDao;

    @Autowired
    private LineBaseParamDao lineBaseParamDao;

    @Override
    public List<LineBaseParam> getAllLineBaseParamByType(String searchValue, Integer lineBaseBigTypeId, Integer lineBaseSmallTypeId) {
        /*List<LineBaseParam> list = lineBaseParamDao.getAllLineBaseParamByType(searchValue, lineBaseBigTypeId, lineBaseSmallTypeId);
        for (LineBaseParam lineBaseParam : list) {
            LineBaseBigType lineBaseBigType = lineBaseBigTypeDao.getLineBaseBigTypeById(lineBaseParam.getLineBaseBigTypeId());
            if(lineBaseBigType != null){
                lineBaseParam.setLineBaseBigType(lineBaseBigType);
            }

            LineBaseSmallType lineBaseSmallType = lineBaseSmallTypeDao.getLineBaseSmallTypeById(lineBaseParam.getLineBaseSmallTypeId());
            if(lineBaseSmallType != null){
                lineBaseParam.setLineBaseSmallType(lineBaseSmallType);
            }
        }*/
        return null;
    }
}
